package xyz.huangziheng.service;


import xyz.huangziheng.basic.util.PageList;
import xyz.huangziheng.entity.Department;
import xyz.huangziheng.utli.DepartmentPage;

import java.util.List;

public interface DepartmentService {
    /**
     * 查询全部
     *
     * @return 所有数据
     */
    List<Department> findAll();

    /**
     * 查询一条
     *
     * @param id
     * @return 一条数据
     */
    Department findById(Long id);

    /**
     * 删除数据
     *
     * @param id
     * @return
     */
    boolean getDelete(Long id);

    /**
     * 更新数据
     *
     * @param department
     * @return 是否成功
     */
    boolean getUpdate(Department department);

    /**
     * 添加数据
     *
     * @param department
     * @return
     */
    boolean getInset(Department department);

    /**
     * 分页
     *
     * @return
     */
    PageList<Department> getPagination(DepartmentPage page);


}
